package Util::IdentityType::IdentityType;
use Moose;
use namespace::autoclean;

has 'schema' => (
	is => 'rw',
	required => 1,
	isa => 'DBIx::Class::Schema',
);

sub get_all {
	my ($self) = @_;
	my @types = $self->schema->resultset('IdentityType')->all();
	return \@types;
}

sub find {
	my ($self, $type_id) = @_;
	my $type = $self->schema->resultset('IdentityType')->find($type_id);
	return $type;
}


__PACKAGE__->meta->make_immutable;

1;
